package com.job.springSea.work0722;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

/**
 * @author 于春海
 * @version 1.0
 * @since 2022-07-23 13:04:54
 */
public class CountNumber {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int[] count=new int[str.length()];
        Map<String,Integer> map =new HashMap<>();

        try {
            if(str==null){
                throw new WithoutNullException("字符串是空",400);
            }else{
                for (int i = 0; i < str.length(); i++) {
                    try {
                        if(Character.isDigit(str.charAt(i))||Character.isLetter(str.charAt(i))){//str.charAt(i)>='a'&&str.charAt(i)<='z'||str.charAt(i)>='A'&&str.charAt(i)<='Z'||str.charAt(i)>='0'&&str.charAt(i)<='9'
                            count[str.indexOf(String.valueOf(str.charAt(i)))]++;
                            map.put(String.valueOf(str.charAt(i)), count[str.indexOf(String.valueOf(str.charAt(i)))]);
                        }else{
                            throw new WithoutWordException("该字符没有字母或数字", 401);
                        }
                    } catch ( WithoutWordException e) {
                        e.printStackTrace();
                    }

                }
            }
        } catch (WithoutNullException e) {
            e.printStackTrace();
        }
        Set<String> keySet=map.keySet();
        for (String s : keySet) {
            System.out.print(s+",");
            Integer value=map.get(s);
            System.out.println(value);
        }
    }
}